#ifndef NETWORK_HPP
#define NETWORK_HPP
#include <SFML/Network.hpp>

#define PKTYPE_SRV_PLCONNECT 0
#define PKTYPE_SRV_PLPOS 1
#define PKTYPE_CLT_PLMOVE 2
#define PKTYPE_SRV_PLDISCONNECT 3

struct PKCONTENT_SRV_PLCONNECT
{
    sf::Int32 pid;
};

struct PKCONTENT_SRV_PLDISCONNECT
{
    sf::Int32 pid;
};

struct PKCONTENT_SRV_PLPOS
{
    sf::Int32 pid;
    float x;
    float y;
    float vel_x;
    float vel_y;
    float rotation;
};

struct PKCONTENT_CLT_PLMOVE
{
    float x;
    float y;
    float vel_x;
    float vel_y;
    float rotation;
};

sf::Uint8 Packet_Type(sf::Packet& Packet);

sf::Packet PK_CLT_PLMOVE(float x, float y, float velocity_x, float velocity_y, float angle);
sf::Packet PK_SRV_PLCONNECT(sf::Int32 pid);
sf::Packet PK_SRV_PLDISCONNECT(sf::Int32 pid);
sf::Packet PK_SRV_PLPOS(sf::Int32 pid, float x, float y, float velocity_x, float velocity_y, float rotation);

struct PKCONTENT_CLT_PLMOVE 		PK_CLT_PLMOVE(sf::Packet& Packet);
struct PKCONTENT_SRV_PLPOS 			PK_SRV_PLPOS(sf::Packet& Packet);
struct PKCONTENT_SRV_PLDISCONNECT 	PK_SRV_PLDISCONNECT(sf::Packet& Packet);
struct PKCONTENT_SRV_PLCONNECT 		PK_SRV_PLCONNECT(sf::Packet& Packet);

#endif
